import numpy as np

# 初始化两个列表用于存储数据
t_list = []
p_list = []

# 读取CSV文件
with open('DDPM/Evaluation/逆向设计问题/p_t_3.csv', 'r') as file:
    for line in file:
        # 去除空字符并分割每行的两个数值
        split_str = line.strip().split(',')
        t_str=split_str[0]
        p_str=split_str[1]
        t_list.append(float(t_str))
        p_list.append(float(p_str))

# 将列表组合成元组列表，并按 t 从小到大排序
data_pairs = sorted(zip(t_list, p_list), key=lambda x: x[0])

# 解压排序后的数据
t_sorted, p_sorted = zip(*data_pairs)

# 转换为 numpy 数组
project_name=__name__.split('.')[-1]
t_array_target = np.array(t_sorted)
p_array_target = np.array(p_sorted)
cstar = 1580
rho = 1780
n = 0.35
At = 0.110795